package ooday02;

public class OverrideDemo {
    public static void main(String[] args) {
        //重写方法被调用,看对象的类执行方法
        Student wyf=new Student("吴亦凡",30,"碧桂园","jsd2307","001");
        wyf.sayHi();//调用Student
        Teacher ls=new Teacher("蔡徐坤",40,"铜锣湾",1000);
        ls.sayHi();//调用Teacher
        Doctor ww=new Doctor("雯雯",50,"碧桂园","主任医师");
        ww.sayHi();//调用Person
    }
}
